#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void Fun(int arr[],int sz)
{
	int newarr[10] = { 0 };
	int k = 0;
	for (k = 0; k < sz ; k++)
	{
		newarr[k] = arr[k];
	}
	int i = 0;
	int j = 0;
	for (i = 0; i < sz; i++)
	{
		if (newarr[i] % 2 != 0)
		{
			arr[j] = newarr[i];
			j++;
		}
		
	}
	for (i = 0; j < sz; i++)
	{
		if (newarr[i] % 2 == 0)
		{
			arr[j] = newarr[i];
			j++;
		}
	}
}

int main()
{
	
	int arr[10] = { 0 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	int k = 0;
	for (k = 0; k < sz; k++)
	{
		scanf("%d", &arr[k]);
	}
	Fun(arr,sz);
	int i = 0;
	for (i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}